import Home from './pages/Home';
import Blog from './pages/Blog';
import Dashboard from './pages/Dashboard';
import BlogWriter from './pages/Blog/components/BlogWriter';
import BlogList from './pages/Blog/components/BlogList';
import Tools from './pages/Tools';
import Setting from './pages/Settings';
import ReadManager from './pages/Dashboard/ReadManager';
import ActiveManager from './pages/Dashboard/ActiveManager';
import PersonalInfo from './pages/Settings/PersonInfo';
import SystemSetting from './pages/Settings/SystemSetting';
import About from './pages/Settings/About';
import WordNote from './pages/WordNote';
import BugCommit from './pages/Settings/BugCommit';

const routes = [
  { path: '/*', key: 'home', name: '主页', component: Home },
  {
    path: '/blog/*',
    key: 'blog',
    name: '博客',
    component: Blog,
    children: [
      {
        path: 'blogWriter',
        key: 'blogWriter',
        name: '博客写作',
        component: BlogWriter,
      },
      {
        path: 'blogList',
        key: 'blogList',
        name: '博客列表',
        component: BlogList,
      },
    ],
  },
  {
    path: '/dashboard/*',
    key: 'dashboard',
    name: '成长管理',
    component: Dashboard,
    children: [
      {
        path: 'readManager',
        key: 'readManager',
        name: '阅读管理',
        component: ReadManager,
      },
      {
        path: 'activeManager',
        key: 'activeManager',
        name: '活动管理',
        component: ActiveManager,
      },
    ],
  },
  { path: '/tools', key: 'tools', name: '实用小工具', component: Tools },
  {
    path: '/setting/*',
    key: 'setting',
    name: '信息与设置',
    component: Setting,
    children: [
      {
        path: 'PersonalInfo',
        key: 'PersonalInfo',
        name: '个人信息',
        component: PersonalInfo,
      },
      {
        path: 'bugs',
        key: 'bugs',
        name: '提交bug',
        component: BugCommit,
      },
      {
        path: 'sysSetting',
        key: 'sysSetting',
        name: '系统设置',
        component: SystemSetting,
      },
      {
        path: 'about',
        key: 'about',
        name: '关于',
        component: About,
      },
    ],
  },
  { path: '/word_note', key: 'word_note', name: '生词本', component: WordNote },
];

export default routes;
